package com.design.pattern.proxy.staticproxy;

public class TeacherDaoImplProxy implements TeacherDao {

    private TeacherDao target; //目标对象，通过接口来聚合
    public TeacherDaoImplProxy(TeacherDao target) {
        this.target = target;
    }

    public void teach() {
        System.out.println("开始代理 完成某些工作。。。");
        target.teach();
        System.out.println("代理完成");
    }
}
